package com.bw.shopping.adapter;

import com.bw.mvvm.entity.SeckillEntity;
import com.bw.mvvm.network.load.LoadImage;
import com.bw.shopping.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

public class SeckillAdapter extends BaseQuickAdapter<SeckillEntity.DataBean, BaseViewHolder> {
    public SeckillAdapter() {
        super(R.layout.item_seckill_recycle);
        addChildClickViewIds(R.id.item_seckill_rob);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, SeckillEntity.DataBean dataBean) {
        baseViewHolder.setText(R.id.item_seckill_value,dataBean.getGoods_default_sku());
        baseViewHolder.setText(R.id.item_seckill_money, "限时价格：￥"+dataBean.getGoods_default_price());
        LoadImage.loadMatchImg(dataBean.getGoods_default_icon(),baseViewHolder.getView(R.id.item_seckill_im));
    }
}
